<!DOCTYPE html>
<html>
<head>
<title>getUserMedia Demo 1</title>
<!-- Load the polyfill to switch-hit between Chrome and Firefox -->
<script src="../../base/adapter.js"></script>
<style>
video {
    border:5px solid black;
    width:480px;
    height:360px;
}
button {
    font: 18px sans-serif;
    padding: 8px;
}
</style>
</head>
<body>
<video id="vid" autoplay="true"></video>
<br>
<button id="btn" onclick="start()">Start</button>
<script>
video = document.getElementById("vid");
function start() {
  navigator.getUserMedia({video:true}, gotStream, function() {});
  btn.disabled = true;
}
function gotStream(stream) {
  attachMediaStream(video, stream);
}
</script>
</body>
</html>

